package com.mezz.bones.framework.id.generator.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "tool_distribute_id", autoResultMap = true)
@ApiModel(value="tool_distribute_id", description="分布式自增ID")
public class DistributedId {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "业务 key")
    private String businessKey; // 业务 key

    @ApiModelProperty(value = "当前ID")
    private Long nextStartId;
}

